﻿
@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>企业网站后台管理系统 - 登录</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">
    <link href="/css/style.css?v=4.1.0" rel="stylesheet">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <script>if(window.top !== window.self){ window.top.location = window.location;}</script>
</head>
<body class="gray-bg">
    <div class="middle-box text-center loginscreen  animated fadeInDown">
        <div>
            <div>
                <h1 class="logo-name">H+</h1>
            </div>
            <h3>欢迎使用 微信公众号支付后台管理系统</h3>
            <form class="m-t" role="form" action="/admin/home/login" method="post">
                <div class="form-group">
                    <input id="username" name="username" class="form-control" placeholder="用户名" required="">
                </div>
                <div class="form-group">
                    <input id="pwd" name="pwd" type="password" class="form-control" placeholder="密码" required="">
                </div>
                <a onclick="sub()"  class="btn btn-primary block full-width m-b">登 录</a>

                @*<p class="text-muted text-center">
                    <a href="login.html#"><small>忘记密码了？</small></a> | <a href="register.html">注册一个新账号</a>
                </p>*@
            </form>
        </div>
    </div>    
    <!-- 全局js -->
    <script src="/js/jquery.min.js?v=2.1.4"></script>
    <script src="/Scripts/jquery.easyui.min.js"></script>
    <script src="/js/plugins/layer/layer.min.js"></script>
    <script src="/js/bootstrap.min.js?v=3.3.6"></script>
    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
    <!--统计代码，可删除-->
</body>
</html>
<script>
    function sub() {
        $('form').form('submit', {
            onSubmit: function () {
                if ($('#username').val().length == 0) {
                    layer.msg('请输入用户名');
                    return false;
                }
                if ($('#pwd').val().length == 0) {
                    layer.msg('请输入密码');
                    return false;
                }
            },
            success: function (data) {
                data = eval('(' + data + ')');
                if (data.status == 0) {
                    window.location.href = data.data;
                } else {
                    layer.msg(data.msg, { icon: 2});
                }
            }
        });
    }
    document.onkeydown = function (e) {
        var ev = document.all ? window.event : e;
        if (ev.keyCode == 13) {
            sub();
        }
    }
</script>